package com.geek.log4jcontrol.core;

import java.io.Serializable;
import java.util.Date;

import com.geek.log4jcontrol.commons.ConfigConstants;

/**
 * @package com.geek.log4jcontrol.core
 * @description log4j的历史配置
 * @author Goliath
 * @createTime 2012-8-3 上午09:53:10
 * @modifyTime
 */
public class ConfigHis implements Serializable {
	private static final long serialVersionUID = 3663421347131974638L;
	/**
	 * @description 配置编码
	 */
	private String configCode;
	/**
	 * @description 配置文件的存放路径
	 */
	private String filePath;
	/**
	 * @description 配置的生成时间
	 */
	private Date createTime;
	/**
	 * @description 配置内容
	 */
	private String context;

	public String getConfigCode() {
		return configCode;
	}

	public void setConfigCode(String configCode) {
		this.configCode = configCode;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public void setContext(String context) {
		this.context = context;
	}

	public String getContext() {
		return context;
	}

	public String toString() {
		String createTimeStr = "NULL";
		if (getCreateTime() != null) {
			createTimeStr = ConfigConstants.SDF.format(getCreateTime());
		}
		return "configCode:" + getConfigCode() + "\rfilePath:" + getFilePath() + "\rcreateTime:" + createTimeStr
				+ "\rcontext:\r" + getContext();
	}

}
